package com.ryudo.mh.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ryudo.mh.model.Meeting;
import com.ryudo.mh.repository.MeetingRepository;

@Service("meetingService")
public class MeetingServiceImpl implements MeetingService {

	@Autowired
	MeetingRepository meetingRepository;
	
	@Override
	@Transactional
	public Meeting save(Meeting meeting) {
		return meetingRepository.saveAndFlush(meeting);
	}

	@Override
	public List<Meeting> findAllMeetings() {
		// TODO Auto-generated method stub
		return meetingRepository.findAll();
	}

}
